unit uApartmentWindowMaterial;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, ToolWin, Grids, DBGridEh, StdCtrls;

type
  TfApartmentWindowMaterial = class(TForm)
    GroupBox1: TGroupBox;
    DBGridEh1: TDBGridEh;
    GroupBox3: TGroupBox;
    DBGridEh2: TDBGridEh;
    GroupBox4: TGroupBox;
    DBGridEh3: TDBGridEh;
    tbAPWGM: TToolBar;
    tbAddAPWGM: TToolButton;
    tbDelAPWGM: TToolButton;
    procedure tbAddAPWGMClick(Sender: TObject);
    procedure tbDelAPWGMClick(Sender: TObject);
    procedure DBGridEh3KeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fApartmentWindowMaterial: TfApartmentWindowMaterial;

implementation

uses uDBData;

{$R *.dfm}

procedure TfApartmentWindowMaterial.tbAddAPWGMClick(Sender: TObject);
begin
  fDBData.InsertRecord(fDBData.dApartmentWindowMaterial);
end;

procedure TfApartmentWindowMaterial.tbDelAPWGMClick(Sender: TObject);
begin
  fDBData.DeleteRecord(fDBData.dApartmentWindowMaterial);
end;

procedure TfApartmentWindowMaterial.DBGridEh3KeyPress(Sender: TObject;
  var Key: Char);
begin
  if Key = #13 then (Sender as TDBGridEh).DataSource.DataSet.Post;
end;

end.
